import { defineComponent as P, reactive as k, watch as j, toRefs as S } from "vue-demi";
const w = /-(\w)/g;
function $(t) {
  return t.replace(w, (n, e) => e.toUpperCase());
}
const N = "frog";
function R(t) {
  return t = `${N}-${t}`, [t, $(`-${t}`)];
}
function E(t) {
  return t.install = (n) => {
    const e = t.name, [s, a] = R(e);
    n.component(s, t), n.component(a, t), n.component(e, t), n.component($(`-${e}`), t);
  }, t;
}
const L = (t) => t != null && t.startsWith("http") || t != null && t.startsWith("data:image") ? t : t ? `data:image/png;base64,${t}` : "";
var W = function() {
  var t = this, n = t.$createElement, e = t._self._c || n;
  return e("div", {
    attrs: {
      id: "teachlog"
    }
  }, [e("div", {
    staticClass: "title"
  }, [t._v(t._s(t.applyTitle) + "\u4ECE\u4E1A\u8D44\u683C\u57F9\u8BAD\u6559\u5B66\u65E5\u5FD7")]), e("div", [e("div", {
    staticClass: "flex-justify"
  }, [e("span", [t.isPassengerTranport(t.applyTitle) ? e("label", [t._v("\u62EC\u53F7\u4E2D\u6807\u6CE8\u201C\u5BA2\u201D\u8005 -- \u4EC5\u4F5C\u4E3A\u9053\u8DEF\u65C5\u5BA2\u8FD0\u8F93\u9A7E\u9A76\u5458\u7684\u6559\u5B66\u9879\u76EE\u6216\u5B66\u65F6")]) : t._e()]), t.teachInfo.enrollBatch ? e("span", [t._v("[" + t._s(t.teachInfo.enrollBatch) + "]")]) : t._e()]), e("div", {
    staticClass: "flex-justify"
  }, [e("span", [t.isPassengerTranport(t.applyTitle) ? e("label", [t._v("\u62EC\u53F7\u4E2D\u6807\u6CE8\u201C\u8D27\u201D\u8005 -- \u4EC5\u4F5C\u4E3A\u9053\u8DEF\u8D27\u7269\u8FD0\u8F93\u9A7E\u9A76\u5458\u7684\u6559\u5B66\u9879\u76EE\u6216\u5B66\u65F6")]) : t._e()]), e("span", [t._v("\u5B66\u5458\u7F16\u53F7\uFF1A" + t._s(t.teachInfo.studentCode))])])]), e("div", [e("table", {
    staticClass: "teachtable",
    attrs: {
      border: "0",
      cellspacing: "0",
      cellpadding: "0"
    }
  }, [e("colgroup", t._l(10, function(s) {
    return e("col", {
      key: s,
      attrs: {
        width: "10%"
      }
    });
  }), 0), e("tbody", [e("tr", [e("td", {
    attrs: {
      colspan: "4"
    }
  }, [e("div", {
    staticClass: "flex"
  }, [e("div", {
    staticClass: "flex-title"
  }, [e("span", {
    staticClass: "bold"
  }, [t._v("\u57F9\u8BAD\u673A\u6784\u540D\u79F0\uFF1A")]), t._v(t._s(t.teachInfo.schoolName) + " ")])])]), e("td", {
    attrs: {
      colspan: "3"
    }
  }, [e("div", {
    staticClass: "flex"
  }, [e("div", {
    staticClass: "flex-title"
  }, [e("span", {
    staticClass: "bold"
  }, [t._v("\u5B66\u5458\u59D3\u540D\uFF1A")]), t._v(t._s(t.teachInfo.name) + " ")])])]), e("td", {
    attrs: {
      colspan: "3"
    }
  }, [e("div", {
    staticClass: "flex"
  }, [t._m(0), e("div", {
    staticStyle: {
      "word-break": "break-all"
    }
  }, [t._v(t._s(t.teachInfo.applyType))])])])]), e("tr", [e("td", {
    attrs: {
      colspan: "10"
    }
  }, [e("div", {
    staticClass: "flex"
  }, [e("div", {
    staticClass: "lineheight15"
  }, [e("span", {
    staticClass: "bold"
  }, [t._v("\u57F9\u8BAD\u76EE\u6807 : ")]), t._v(t._s(t.teachInfo.trainTarget) + " ")])])])])])]), t._l(t.teachInfo.studentInfoDetails, function(s) {
    return [s.educationDictionary.educationSubject == "\u533A\u57DF\u5B9E\u64CD" && t.teachInfo.applyType.includes("\u7F51\u7EDC\u9884\u7EA6") ? t._e() : e("div", [e("table", {
      staticClass: "teachtable",
      attrs: {
        border: "0",
        cellspacing: "0",
        cellpadding: "0"
      }
    }, [e("colgroup", t._l(10, function(a) {
      return e("col", {
        key: a,
        attrs: {
          width: "10%"
        }
      });
    }), 0), e("tbody", [e("tr", [e("td", {
      attrs: {
        colspan: "2",
        rowspan: "2"
      }
    }, [e("h5", [t._v(" " + t._s(s.educationDictionary.educationSubject) + "\u5B66\u65F6\uFF1A "), t.isPassengerTranport(t.applyTitle) && s.educationDictionary.educationSubject == "\u7406\u8BBA" ? e("span", [t._v(t._s(s.educationDictionary.theoryPeriod) + "(\u5BA2) "), e("br"), t._v(" 48(\u8D27)")]) : t.isPassengerTranport(t.applyTitle) && s.educationDictionary.educationSubject == "\u5E94\u7528\u80FD\u529B" ? e("span", [t._v(t._s(s.educationDictionary.theoryPeriod) + "(\u5BA2)"), e("br"), t._v(" 8(\u8D27)")]) : e("span", [t._v(t._s(s.educationDictionary.theoryPeriod))])])]), t._m(1, !0), t._m(2, !0)]), e("tr", [e("td", {
      attrs: {
        colspan: "4"
      }
    }, t._l(s.educationDictionary.educationProject, function(a, l) {
      return e("div", {
        key: `some1-${l}`,
        staticClass: "flex lineheight15"
      }, [t._v(" " + t._s(a) + " ")]);
    }), 0), e("td", {
      attrs: {
        colspan: "4"
      }
    }, t._l(s.educationDictionary.educationTarget, function(a, l) {
      return e("div", {
        key: `some-${l}`,
        staticClass: "flex lineheight15"
      }, [t._v(" " + t._s(a) + " ")]);
    }), 0)]), s.educationDictionary.educationSubject === "\u7406\u8BBA" && t.isDangerTranport(t.applyTitle) ? e("tr", [t._m(3, !0)]) : t._e()])]), e("table", {
      staticClass: "teachtable",
      attrs: {
        border: "0",
        cellspacing: "0",
        cellpadding: "0"
      }
    }, [e("colgroup", [e("col", {
      attrs: {
        width: "10%"
      }
    }), e("col", {
      attrs: {
        width: "10%"
      }
    }), t._l(s.studyInfoDays.length, function(a) {
      return e("col", {
        key: a,
        attrs: {
          width: t.getWidth(s.studyInfoDays.length)
        }
      });
    })], 2), e("tbody", t._l(s.studyList, function(a, l) {
      return e("tr", {
        key: l
      }, [e("td", {
        attrs: {
          colspan: "2"
        }
      }, [e("h5", [t._v(t._s(a.label))])]), t._l(a.value, function(_, p) {
        return e("td", {
          key: `sub_${p}`
        }, [e("div", {
          staticClass: "studentsign"
        }, [a.prop === "name" && t.teachInfo.signature ? e("img", {
          staticClass: "studentimg",
          attrs: {
            src: t.getImage(t.teachInfo.signature)
          }
        }) : e("span", [t._v(t._s(_[a.prop]))])])]);
      })], 2);
    }), 0)])])];
  }), e("table", {
    staticClass: "teachtable",
    attrs: {
      border: "0",
      cellspacing: "0",
      cellpadding: "0"
    }
  }, [e("colgroup", t._l(10, function(s) {
    return e("col", {
      key: s,
      attrs: {
        width: "10%"
      }
    });
  }), 0), e("tbody", [e("tr", [e("td", {
    attrs: {
      colspan: "7"
    }
  }, [e("div", {
    staticClass: "flex items-center",
    staticStyle: {
      height: "60px"
    }
  }, [e("h5", [t._v("\u8003\u6838\u610F\u89C1\uFF1A")]), e("span", [t._v(t._s(t.teachInfo.testRemarks))])])]), e("td", {
    attrs: {
      colspan: "3"
    }
  }, [e("div", {
    staticClass: "flex items-center"
  }, [e("h5", [t._v("\u8003\u6838\u4EBA\u7B7E\u5B57\uFF1A")]), e("span", [t._v(t._s(t.teachInfo.testerName))])])])]), e("tr", [t._m(4), e("td", {
    attrs: {
      colspan: "8"
    }
  }, [e("div", {
    staticClass: "flex justify-end"
  }, [e("div", {
    staticClass: "flex items-end",
    staticStyle: {
      height: "100px"
    }
  }, [t._v("\uFF08\u76D6\u7AE0\uFF09")]), t.teachInfo.signaturePhoto ? e("div", [e("div", {
    staticClass: "sign-img"
  }, [e("div", {
    staticClass: "signature-regular"
  }, [t._v("\u57F9\u8BAD\u5408\u683C")]), e("div", {
    staticClass: "signature-time"
  }, [t._v(t._s(t.teachInfo.signatureTime))]), e("img", {
    attrs: {
      src: t.getImage(t.teachInfo.signaturePhoto),
      alt: ""
    }
  })])]) : t._e()])])])])])], 2)]);
}, z = [function() {
  var t = this, n = t.$createElement, e = t._self._c || n;
  return e("div", {
    staticClass: "flex-title"
  }, [e("span", {
    staticClass: "bold"
  }, [t._v("\u7533\u8BF7\u7C7B\u522B\uFF1A")])]);
}, function() {
  var t = this, n = t.$createElement, e = t._self._c || n;
  return e("td", {
    attrs: {
      colspan: "4"
    }
  }, [e("h5", [t._v("\u6559\u5B66\u9879\u76EE")])]);
}, function() {
  var t = this, n = t.$createElement, e = t._self._c || n;
  return e("td", {
    attrs: {
      colspan: "4"
    }
  }, [e("h5", [t._v("\u6559\u5B66\u76EE\u6807")])]);
}, function() {
  var t = this, n = t.$createElement, e = t._self._c || n;
  return e("td", {
    attrs: {
      colspan: "10"
    }
  }, [e("h5", [t._v("\u7206\u70B8\u54C1\u8FD0\u8F93\u4ECE\u4E1A\u4EBA\u5458\u5E94\u5B66\u4E60\u5E26*\u5185\u5BB9\uFF1B\u5267\u6BD2\u5316\u5B66\u54C1\u8FD0\u8F93\u4ECE\u4E1A\u4EBA\u5458\u5E94\u5B66\u4E60\u5E26#\u5185\u5BB9")])]);
}, function() {
  var t = this, n = t.$createElement, e = t._self._c || n;
  return e("td", {
    attrs: {
      colspan: "2"
    }
  }, [e("h5", {
    staticStyle: {
      width: "160px"
    }
  }, [t._v("\u57F9\u8BAD\u673A\u6784\u5BA1\u6838\u610F\u89C1")])]);
}];
function A(t, n, e, s, a, l, _, p) {
  var r = typeof t == "function" ? t.options : t;
  n && (r.render = n, r.staticRenderFns = e, r._compiled = !0), s && (r.functional = !0), l && (r._scopeId = "data-v-" + l);
  var c;
  if (_ ? (c = function(i) {
    i = i || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !i && typeof __VUE_SSR_CONTEXT__ < "u" && (i = __VUE_SSR_CONTEXT__), a && a.call(this, i), i && i._registeredComponents && i._registeredComponents.add(_);
  }, r._ssrRegister = c) : a && (c = p ? function() {
    a.call(
      this,
      (r.functional ? this.parent : this).$root.$options.shadowRoot
    );
  } : a), c)
    if (r.functional) {
      r._injectStyles = c;
      var v = r.render;
      r.render = function(f, u) {
        return c.call(u), v(f, u);
      };
    } else {
      var d = r.beforeCreate;
      r.beforeCreate = d ? [].concat(d, c) : [c];
    }
  return {
    exports: t,
    options: r
  };
}
const H = [
  { name: "\u7ECF\u8425\u6027\u9053\u8DEF\u65C5\u5BA2\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u9053\u8DEF\u5BA2\u8D27\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u9053\u8DEF\u8D27\u7269\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u9053\u8DEF\u5BA2\u8D27\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458", label: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458" },
  { name: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458", label: "\u9053\u8DEF\u5371\u9669\u8D27\u7269\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458" },
  { name: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458", label: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458" },
  { name: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458", label: "\u653E\u5C04\u6027\u7269\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458" },
  { name: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458", label: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458" },
  { name: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458", label: "\u5267\u6BD2\u5316\u5B66\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458" },
  { name: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458", label: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u9A7E\u9A76\u5458" },
  { name: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458", label: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u88C5\u5378\u7BA1\u7406\u4EBA\u5458" },
  { name: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458", label: "\u7206\u70B8\u54C1\u9053\u8DEF\u8FD0\u8F93\u62BC\u8FD0\u4EBA\u5458" },
  { name: "\u5DE1\u6E38\u51FA\u79DF\u6C7D\u8F66\u9A7E\u9A76\u5458", label: "\u51FA\u79DF\u6C7D\u8F66\u9A7E\u9A76\u5458" },
  { name: "\u7F51\u7EDC\u9884\u7EA6\u51FA\u79DF\u6C7D\u8F66\u9A7E\u9A76\u5458", label: "\u51FA\u79DF\u6C7D\u8F66\u9A7E\u9A76\u5458" }
], O = P({
  name: "teachLog",
  props: {
    childData: {
      type: Object,
      default: () => {
      }
    }
  },
  setup(t) {
    const n = k({
      studyList: [
        { label: "\u6B21\u6570/\u65E5\u671F", value: [], prop: "timeDate" },
        { label: "\u6559\u5B66\u9879\u76EE", value: [], prop: "trainSubject" },
        { label: "\u6240\u7528\u5B66\u65F6", value: [], prop: "trainHour" },
        { label: "\u5B66\u5458\u7B7E\u5B57", value: [], prop: "name" },
        { label: "\u6559\u7EC3\u5458\u8BC4\u4EF7\u53CA\u7B7E\u5B57", value: [], prop: "teacherName" }
      ],
      teachInfo: {
        schoolName: "",
        applyType: "",
        studyInfoDays: [],
        trainTarget: "",
        signatureTime: "",
        signaturePhoto: "",
        studentCode: ""
      },
      applyTitle: ""
    }), e = (a) => a == "\u9053\u8DEF\u5BA2\u8D27\u8FD0\u8F93\u9A7E\u9A76\u5458", s = (a) => ["\u5371\u9669", "\u5267\u6BD2", "\u7206\u70B8"].some((l) => a.includes(l));
    return j(() => t.childData, (a) => {
      var l, _, p, r, c;
      if (a && Object.keys(a).length) {
        const v = new Array(8).fill({});
        let d = {
          ...a
        };
        d.studentInfoDetails = (l = d.studentInfoDetails) == null ? void 0 : l.map((i) => {
          var h, y, g, m, b, C, T;
          const f = (h = i.studyInfoDays) == null ? void 0 : h.length;
          let u = v;
          if (f > 0 && (u = (y = i.studyInfoDays) == null ? void 0 : y.map((o, x) => {
            var D;
            return o.trainHour = o.trainHour > 0 ? o.trainHour : 0, o.teacherName = (D = o.teacherName) != null ? D : "-", o.timeDate = `${x + 1}/${o.date}`, o;
          }), f < 8)) {
            let o = new Array(8 - f).fill({});
            u = [...u, ...o];
          }
          return {
            ...i,
            studyInfoDays: u,
            educationDictionary: {
              ...i.educationDictionary,
              educationTarget: (m = (g = i.educationDictionary) == null ? void 0 : g.educationTarget) == null ? void 0 : m.split("\u3002"),
              educationProject: (C = (b = i.educationDictionary) == null ? void 0 : b.educationProject) == null ? void 0 : C.split("\u3002")
            },
            studyList: (T = n.studyList) == null ? void 0 : T.map((o) => ({
              ...o,
              value: u
            }))
          };
        }), d.trainTarget = (r = (p = (_ = a.studentInfoDetails) == null ? void 0 : _[0]) == null ? void 0 : p.educationDictionary) == null ? void 0 : r.trainTarget, n.applyTitle = (c = H.find((i) => i.name == d.applyType)) == null ? void 0 : c.label, n.teachInfo = d;
      }
    }, {
      immediate: !0,
      deep: !0
    }), {
      ...S(n),
      getImage: L,
      getWidth(a) {
        return `${80 / a}%`;
      },
      isDangerTranport: s,
      isPassengerTranport: e
    };
  }
}), I = {};
var U = /* @__PURE__ */ A(
  O,
  W,
  z,
  !1,
  B,
  "17995eea",
  null,
  null
);
function B(t) {
  for (let n in I)
    this[n] = I[n];
}
const F = /* @__PURE__ */ function() {
  return U.exports;
}(), M = E(F);
export {
  M as default
};
